﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GodBuilderIdea
{
    /// <summary>
    /// Basic interface for the 
    /// </summary>
    public interface IEvent
    {
        void Excecute();
    }

    class ActionEvent : IEvent
    {
        private Action m_action;

        public ActionEvent(Action p_action)
        {
            m_action = p_action;
        }

        public void Excecute()
        {
            m_action();
        }
    }

    public class ActionEvent<t> : IEvent
    {
        private Action<t> m_action;
        private t m_parameter;

        public ActionEvent(Action<t> p_action, t p_parameter)
        {
            m_action = p_action;
            m_parameter = p_parameter;
        }
        public void Excecute()
        {
            m_action(m_parameter);
        }
    }
}
